'use strict';
const { setMenuActive } = require('../utils');
const Controller = require('egg').Controller;

class AccountController extends Controller {
  async index() {
    const ctx = this.ctx;
    const targetURLNode = ctx.targetURLNode;
    const data = {
      title: '红塔期货-网上开户',
      menu: setMenuActive(ctx.app.menus, targetURLNode.nodeArr[targetURLNode.nodeArr.length - 1].label),
    };
    await this.ctx.render('/onlineCenter/openAccount.njk', data);
  }

  async pcAccount() {
    const data = {
      title: '红塔期货-开户指南',
    };
    await this.ctx.render('/onlineCenter/pcAccount.njk', data);
  }
  async mobileAccount() {
    const data = {
      title: '红塔期货-开户指南',
    };
    await this.ctx.render('/onlineCenter/mobileAccount.njk', data);
  }
}

module.exports = AccountController;
